def banner():
    print("----------------------------------")
    print("*                                *")
    print("*            密码生成器            *")
    print("*                                *")
    print("----------------------------------")

def option():
    info = []
    name = input("请输入名称（中文名请输入拼音首字母）：\r\n")
    info.append(name)
    bdate = input("请输入出生日期（格式：YYYYMMDD）：\r\n")
    info.append(bdate)
    return info

def deal(data):
    rule1 = str(data[0])+str(data[1])
    rule2 = str(data[1])+str(data[0])
    return rule1,rule2

def wirtefile(text1,text2):
    f = open("dic.txt","w+")
    f.write(text1+'\r\n'+text2)
    a = f.read()
    if a != 0:
        print("字典生成成功")

if __name__ == '__main__':
    banner()
    li = option()
    a,b = deal(li)
    wirtefile(a,b)
